#!/usr/bin/env perl


use 5.010;
use strict;
use Rpmlib;
use Data::Dumper;

say "test";
my $ver1 = "1.0";
my $ver2 = "2.9";
my $ret = Rpmlib::rpmvercmp($ver1, $ver2);

my $pkg = Rpmlib->open_package('111.rpm');
say $pkg->name;
say $pkg->version;
say $pkg->arch;
say $pkg->epoch;

say $pkg->tagformat("%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}");

my @cl = $pkg->changelog();
# too much info dumped,comment the line
# say Dumper(\@cl);

say $pkg->tag('name');
say $pkg->as_nvre();

my @files = $pkg->files();
foreach my $file (@files)
{
    say $file;
}




